Problem Note 69799: Using the XLS engine with PROC IMPORT transcodes 8-bit characters to UTF-8 regardless of the SAS® Session encoding in SAS® 9.4M7
Using the IMPORT procedure with the XLS engine in SAS 9.4M7 (TS1M7) transcodes 8-bit National Language Support (NLS) characters to UTF-8 regardless of the current SAS Session encoding value. The resulting data in a SAS Latin1-, Latin2-, or Latin9-encoded session appears with garbage characters.
For example, "Blåbærgrød" appears as "BlÃ¥bÊrgrÞd"
The SAS log file does not contain any ERROR or WARNING messages when this issue occurs.
Current workarounds for this issue include the following:
- Save the original .xls file as .xlsx.
- Use the DATASETS procedure with the CORRECTENCODING option to change the data set encoding to UTF-8.
In the following example, the library name is WORK and the data set name is TEST:
proc datasets lib=WORK nolist;
modify TEST / correctencoding=UTF8;
quit;
Click the Hot Fix tab in this note to access the hot fix for this issue.
Operating System and Release Information
SAS System | SAS/ACCESS Interface to PC Files | Microsoft® Windows® for x64 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows 8 Enterprise 32-bit | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows 8 Enterprise x64 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows 8 Pro 32-bit | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows 8 Pro x64 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows 8.1 Enterprise 32-bit | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows 8.1 Enterprise x64 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows 8.1 Pro 32-bit | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows 8.1 Pro x64 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows 10 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows 11 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows Server 2008 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows Server 2008 R2 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows Server 2008 for x64 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows Server 2012 Datacenter | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows Server 2012 R2 Datacenter | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows Server 2012 R2 Std | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows Server 2012 Std | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows Server 2016 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows Server 2019 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows Server 2022 | 9.4 TS1M7 | 9.4 TS1M8 |
Windows 7 Enterprise 32 bit | 9.4 TS1M7 | 9.4 TS1M8 |
Windows 7 Enterprise x64 | 9.4 TS1M7 | 9.4 TS1M8 |
Windows 7 Home Premium 32 bit | 9.4 TS1M7 | 9.4 TS1M8 |
Windows 7 Home Premium x64 | 9.4 TS1M7 | 9.4 TS1M8 |
Windows 7 Professional 32 bit | 9.4 TS1M7 | 9.4 TS1M8 |
Windows 7 Professional x64 | 9.4 TS1M7 | 9.4 TS1M8 |
Windows 7 Ultimate 32 bit | 9.4 TS1M7 | 9.4 TS1M8 |
Windows 7 Ultimate x64 | 9.4 TS1M7 | 9.4 TS1M8 |
64-bit Enabled AIX | 9.4 TS1M7 | 9.4 TS1M8 |
64-bit Enabled Solaris | 9.4 TS1M7 | 9.4 TS1M8 |
HP-UX IPF | 9.4 TS1M7 | 9.4 TS1M8 |
Linux for x64 | 9.4 TS1M7 | 9.4 TS1M8 |
Solaris for x64 | 9.4 TS1M7 | 9.4 TS1M8 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Using PROC IMPORT with the XLS engine in SAS 9.4 TS1M7 results in NLS (8-bit characters) being transcoded to UTF-8 regardless of the current SAS session encoding value. The resulting data in a SAS Latin1, Latin2, or Latin9 encoded session appears with garbage characters.
Type: | Problem Note |
Priority: | high |
Date Modified: | 2023-03-10 15:17:38 |
Date Created: | 2023-01-11 14:20:41 |